package com.zhongfl.crm.enums.boss;

import lombok.Getter;

@Getter
public enum OrderQueryType {

    /**
     * 订单查询类型
     */
    QUERY_MY_FOLLOWED("1","查询我关注的订单"),
    QUERY_UN_EVALUATED("2","查询待评价的订单"),
    QUERY_MY_EVALUATION("3","查询我的已评价订单"),
    QUERY_MY_COOPERATION("4", "查询我协作的订单"),

    OTHER("0","其他");

    @Getter
    private String  key;
    @Getter
    private String name;

    OrderQueryType(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public static OrderQueryType getEnumByKey(String key) {
        for (OrderQueryType item : OrderQueryType.values()) {
            if (item.getKey().equals(key)) {
                return item;
            }
        }
        return OTHER;
    }

}
